FROM node:16.16.0 AS build-stage
WORKDIR /app
COPY . /app/
RUN npm install
RUN npm run build
RUN pwd
RUN ls

FROM nginx:latest
RUN pwd
RUN ls
COPY default.conf  /etc/nginx/conf.d/
COPY --from=build-stage /app/dist /usr/share/nginx/html

EXPOSE 80